package com.gears_software.bbnetwork.dialogs;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import com.gears_software.bbnetwork.R;

/**
 * 未实名认证提示框
 * @author DY-PC
 *
 */
public class StyleDialog extends Dialog {

	public StyleDialog(Context context, int theme) {
		super(context, theme);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		setContentView(R.layout.stylo_dialog);
		ImageView image_close = (ImageView) findViewById(R.id.image_close);
		Button btn_go = (Button) findViewById(R.id.btn_go);
		
		image_close.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				isStyleDialogResult.returnCode(0);
				//关闭
			}
		});
		
		btn_go.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				isStyleDialogResult.returnCode(1);
				//去认证
			}
		});
	}
	
	public interface IStyleDialogResult{
		public void returnCode(int type);
	}
	
	private IStyleDialogResult isStyleDialogResult;
	
	public void setOnIstyleDialogResult(IStyleDialogResult isStyleDialogResult){
		this.isStyleDialogResult = isStyleDialogResult;
	}
}
